//
// File  : FlightDatabase.h
// Team  : Dangling Pointers
// Class : CST 236 - Software Testing
//
// Header file for the FlightDatabase class.
// FlightDatabase is a container of Flight
// objects.
//

#ifndef FLIGHTDATABASE_H
#define FLIGHTDATABASE_H

#include <iterator>
#include "Flight.h"


// typedefs to simplify stl syntax
typedef std::map<std::string, Flight> FlightMap;
typedef std::map<std::string, Flight>::iterator FlightMapIter;
typedef std::map<std::string, Flight>::const_iterator FlightMapIterC;

// class definition
class FlightDatabase
{
	FlightMap      m_database;

public:

	// constructor
	FlightDatabase();

	// accessor
	const Flight&  getFlight(const std::string&) const;

	// mutators
	void           addFlight(const std::string&, const Flight&);
	bool           removeFlight(const std::string&);
	void           changeFlightDepartureTime(const std::string& flightId, const std::string& departureTime);
	void           changeFlightArrivalTime(const std::string&, const std::string&);
	void           changeFlightStatus(const std::string&, Flight::Status);
	void           addFirstClassSeating(const std::string&, const std::string&);
	void           addCoachClassSeating(const std::string&, const std::string&);
	void           removePassengerFromSeatingChart(const std::string&, const std::string&);

	// print all flights to console
	void           printFlights() const;

};

#endif
